home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17721 < prev    next >
Encoding:
Text File  |  1996-08-05  |  921 b   |  34 lines

  1. Newsgroups: comp.lang.c++
  2. Path: presby.edu!jtbell
  3. From: jtbell@presby.edu (Jon Bell)
  4. Subject: Re: Recursive CONSTRUCTOR allowed?
  5. Message-ID: <Dpzr3B.DDx@presby.edu>
  6. Date: Wed, 17 Apr 1996 05:25:59 GMT
  7. References: <4l1ck5$pit@falcon.ccs.uwo.ca>
  8. Organization: Presbyterian College, Clinton, South Carolina USA
  9.  
  10.  Sharon Wang  <swang1@julian.uwo.ca> wrote:
  11. >I'd like to implement the following algorithm using constructor
  12. >(I am TOLD to do so)
  13. >
  14. >// create an n linked list
  15. >create node(n)
  16. >{
  17. >    if (n = 0) then
  18. >        reach the length, don't create!
  19. >    else
  20. >        create this node;
  21. >        create node(n-1);
  22. >        make link;
  23. >    end if
  24. >    return;
  25. >}
  26. >
  27. >(1) FIrst of all, does this make sense?
  28.  
  29. No.  (Not to *me*, anyway... :-))  What is an "n linked list"?
  30.  
  31. -- 
  32. Jon Bell <jtbell@presby.edu>                        Presbyterian College
  33. Dept. of Physics and Computer Science        Clinton, South Carolina USA
  34.